﻿
namespace NetROS.Tiers.Windows.Forms
{
	/// <summary>
	/// abstract DokumentZaglavljeSpecPostavke typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class DokumentZaglavljeSpecPostavkeDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<DokumentZaglavljeSpecPostavkeDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.DokumentZaglavljeSpecPostavke _currentDokumentZaglavljeSpecPostavke = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxDokumentZaglavljeSpecPostavkeDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxDokumentZaglavljeSpecPostavkeErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxDokumentZaglavljeSpecPostavkeBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the ID property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDSpecTip property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDSpecTipDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDDokumentTip property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDDokumentTipDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the RedBr property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxRedBrDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Kolona property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxKolonaDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.DokumentTip> _IDDokumentTipList;
		
		/// <summary> 
		/// The list of selectable DokumentTip
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.DokumentTip> IDDokumentTipList
		{
			get {return this._IDDokumentTipList;}
			set 
			{
				this._IDDokumentTipList = value;
				this.uxIDDokumentTipDataGridViewColumn.DataSource = null;
				this.uxIDDokumentTipDataGridViewColumn.DataSource = this._IDDokumentTipList;
			}
		}
		
		private bool _allowNewItemInIDDokumentTipList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of DokumentTip
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDDokumentTipList
		{
			get { return _allowNewItemInIDDokumentTipList;}
			set
			{
				this._allowNewItemInIDDokumentTipList = value;
				this.uxIDDokumentTipDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.DokumentZaglavljeSpecTip> _IDSpecTipList;
		
		/// <summary> 
		/// The list of selectable DokumentZaglavljeSpecTip
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.DokumentZaglavljeSpecTip> IDSpecTipList
		{
			get {return this._IDSpecTipList;}
			set 
			{
				this._IDSpecTipList = value;
				this.uxIDSpecTipDataGridViewColumn.DataSource = null;
				this.uxIDSpecTipDataGridViewColumn.DataSource = this._IDSpecTipList;
			}
		}
		
		private bool _allowNewItemInIDSpecTipList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of DokumentZaglavljeSpecTip
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDSpecTipList
		{
			get { return _allowNewItemInIDSpecTipList;}
			set
			{
				this._allowNewItemInIDSpecTipList = value;
				this.uxIDSpecTipDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.DokumentZaglavljeSpecPostavke> _DokumentZaglavljeSpecPostavkeList;
				
		/// <summary> 
		/// The list of DokumentZaglavljeSpecPostavke to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.DokumentZaglavljeSpecPostavke> DokumentZaglavljeSpecPostavkeList
		{
			get {return this._DokumentZaglavljeSpecPostavkeList;}
			set
			{
				this._DokumentZaglavljeSpecPostavkeList = value;
				this.uxDokumentZaglavljeSpecPostavkeBindingSource.DataSource = null;
				this.uxDokumentZaglavljeSpecPostavkeBindingSource.DataSource = value;
				this.uxDokumentZaglavljeSpecPostavkeDataGridView.DataSource = null;
				this.uxDokumentZaglavljeSpecPostavkeDataGridView.DataSource = this.uxDokumentZaglavljeSpecPostavkeBindingSource;				
				//this.uxDokumentZaglavljeSpecPostavkeBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxDokumentZaglavljeSpecPostavkeBindingSource_ListChanged);
				this.uxDokumentZaglavljeSpecPostavkeBindingSource.CurrentItemChanged += new System.EventHandler(OnDokumentZaglavljeSpecPostavkeBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnDokumentZaglavljeSpecPostavkeBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentDokumentZaglavljeSpecPostavke = uxDokumentZaglavljeSpecPostavkeBindingSource.Current as Entities.DokumentZaglavljeSpecPostavke;
			
			if (_currentDokumentZaglavljeSpecPostavke != null)
			{
				_currentDokumentZaglavljeSpecPostavke.Validate();
			}
			//_DokumentZaglavljeSpecPostavke.Validate();
			OnCurrentEntityChanged();
		}

		//void uxDokumentZaglavljeSpecPostavkeBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.DokumentZaglavljeSpecPostavke"/> instance.
		/// </summary>
		public Entities.DokumentZaglavljeSpecPostavke SelectedDokumentZaglavljeSpecPostavke
		{
			get {return this._currentDokumentZaglavljeSpecPostavke;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxDokumentZaglavljeSpecPostavkeDataGridView.VirtualMode;}
			set
			{
				this.uxDokumentZaglavljeSpecPostavkeDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxDokumentZaglavljeSpecPostavkeDataGridView.AllowUserToAddRows;}
			set {this.uxDokumentZaglavljeSpecPostavkeDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxDokumentZaglavljeSpecPostavkeDataGridView.AllowUserToDeleteRows;}
			set {this.uxDokumentZaglavljeSpecPostavkeDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxDokumentZaglavljeSpecPostavkeDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxDokumentZaglavljeSpecPostavkeDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="DokumentZaglavljeSpecPostavkeDataGridViewBase"/> class.
		/// </summary>
		public DokumentZaglavljeSpecPostavkeDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxDokumentZaglavljeSpecPostavkeDataGridView = new System.Windows.Forms.DataGridView();
			this.uxDokumentZaglavljeSpecPostavkeBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxDokumentZaglavljeSpecPostavkeErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDSpecTipDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxIDDokumentTipDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxRedBrDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxKolonaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			//this.uxIDDokumentTipBindingSource = new DokumentTipBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDDokumentTipBindingSource)).BeginInit();
			//this.uxIDSpecTipBindingSource = new DokumentZaglavljeSpecTipBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDSpecTipBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDokumentZaglavljeSpecPostavkeDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDokumentZaglavljeSpecPostavkeBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDokumentZaglavljeSpecPostavkeErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxDokumentZaglavljeSpecPostavkeErrorProvider
			// 
			this.uxDokumentZaglavljeSpecPostavkeErrorProvider.ContainerControl = this;
			this.uxDokumentZaglavljeSpecPostavkeErrorProvider.DataSource = this.uxDokumentZaglavljeSpecPostavkeBindingSource;						
			// 
			// uxDokumentZaglavljeSpecPostavkeDataGridView
			// 
			this.uxDokumentZaglavljeSpecPostavkeDataGridView.AutoGenerateColumns = false;
			this.uxDokumentZaglavljeSpecPostavkeDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxDokumentZaglavljeSpecPostavkeDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDDataGridViewColumn,
		this.uxIDSpecTipDataGridViewColumn,
		this.uxIDDokumentTipDataGridViewColumn,
		this.uxRedBrDataGridViewColumn,
		this.uxKolonaDataGridViewColumn			});
			this.uxDokumentZaglavljeSpecPostavkeDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxDokumentZaglavljeSpecPostavkeDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxDokumentZaglavljeSpecPostavkeDataGridView.Name = "uxDokumentZaglavljeSpecPostavkeDataGridView";
			this.uxDokumentZaglavljeSpecPostavkeDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxDokumentZaglavljeSpecPostavkeDataGridView.TabIndex = 0;	
			this.uxDokumentZaglavljeSpecPostavkeDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxDokumentZaglavljeSpecPostavkeDataGridView.EnableHeadersVisualStyles = false;
			this.uxDokumentZaglavljeSpecPostavkeDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnDokumentZaglavljeSpecPostavkeDataGridViewDataError);
			this.uxDokumentZaglavljeSpecPostavkeDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnDokumentZaglavljeSpecPostavkeDataGridViewCellValueNeeded);
			this.uxDokumentZaglavljeSpecPostavkeDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnDokumentZaglavljeSpecPostavkeDataGridViewCellValuePushed);
			
			//
			// uxIDDataGridViewColumn
			//
			this.uxIDDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDataGridViewColumn.DataPropertyName = "ID";
			this.uxIDDataGridViewColumn.HeaderText = "ID";
			this.uxIDDataGridViewColumn.Name = "uxIDDataGridViewColumn";
			this.uxIDDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDataGridViewColumn.ReadOnly = true;		
			//
			// uxIDSpecTipDataGridViewColumn
			//
			this.uxIDSpecTipDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDSpecTipDataGridViewColumn.DataPropertyName = "IDSpecTip";
			this.uxIDSpecTipDataGridViewColumn.HeaderText = "IDSpecTip";
			this.uxIDSpecTipDataGridViewColumn.Name = "uxIDSpecTipDataGridViewColumn";
			this.uxIDSpecTipDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDSpecTipDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDSpecTipDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDDokumentTipDataGridViewColumn
			//
			this.uxIDDokumentTipDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDokumentTipDataGridViewColumn.DataPropertyName = "IDDokumentTip";
			this.uxIDDokumentTipDataGridViewColumn.HeaderText = "IDDokumentTip";
			this.uxIDDokumentTipDataGridViewColumn.Name = "uxIDDokumentTipDataGridViewColumn";
			this.uxIDDokumentTipDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDokumentTipDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDokumentTipDataGridViewColumn.ReadOnly = false;		
			//
			// uxRedBrDataGridViewColumn
			//
			this.uxRedBrDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxRedBrDataGridViewColumn.DataPropertyName = "RedBr";
			this.uxRedBrDataGridViewColumn.HeaderText = "RedBr";
			this.uxRedBrDataGridViewColumn.Name = "uxRedBrDataGridViewColumn";
			this.uxRedBrDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxRedBrDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxRedBrDataGridViewColumn.ReadOnly = false;		
			//
			// uxKolonaDataGridViewColumn
			//
			this.uxKolonaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxKolonaDataGridViewColumn.DataPropertyName = "Kolona";
			this.uxKolonaDataGridViewColumn.HeaderText = "Kolona";
			this.uxKolonaDataGridViewColumn.Name = "uxKolonaDataGridViewColumn";
			this.uxKolonaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxKolonaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxKolonaDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDDokumentTipDataGridViewColumn
			//				
			this.uxIDDokumentTipDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDDokumentTipDataGridViewColumn.ValueMember = "ID";	
			this.uxIDDokumentTipDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDDokumentTipDataGridViewColumn.DataSource = uxIDDokumentTipBindingSource;				
				
			//
			// uxIDSpecTipDataGridViewColumn
			//				
			this.uxIDSpecTipDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDSpecTipDataGridViewColumn.ValueMember = "ID";	
			this.uxIDSpecTipDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDSpecTipDataGridViewColumn.DataSource = uxIDSpecTipBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxDokumentZaglavljeSpecPostavkeDataGridView);
			this.Name = "DokumentZaglavljeSpecPostavkeDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDDokumentTipBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDSpecTipBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDokumentZaglavljeSpecPostavkeErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDokumentZaglavljeSpecPostavkeDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxDokumentZaglavljeSpecPostavkeBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				DokumentZaglavljeSpecPostavkeDataGridViewEventArgs args = new DokumentZaglavljeSpecPostavkeDataGridViewEventArgs();
				args.DokumentZaglavljeSpecPostavke = _currentDokumentZaglavljeSpecPostavke;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class DokumentZaglavljeSpecPostavkeDataGridViewEventArgs : System.EventArgs
		{
			private Entities.DokumentZaglavljeSpecPostavke	_DokumentZaglavljeSpecPostavke;
	
			/// <summary>
			/// the  Entities.DokumentZaglavljeSpecPostavke instance.
			/// </summary>
			public Entities.DokumentZaglavljeSpecPostavke DokumentZaglavljeSpecPostavke
			{
				get { return _DokumentZaglavljeSpecPostavke; }
				set { _DokumentZaglavljeSpecPostavke = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxDokumentZaglavljeSpecPostavkeDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnDokumentZaglavljeSpecPostavkeDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxDokumentZaglavljeSpecPostavkeDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnDokumentZaglavljeSpecPostavkeDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxDokumentZaglavljeSpecPostavkeDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						e.Value = DokumentZaglavljeSpecPostavkeList[e.RowIndex].ID;
						break;
					case "uxIDSpecTipDataGridViewColumn":
						e.Value = DokumentZaglavljeSpecPostavkeList[e.RowIndex].IDSpecTip;
						break;
					case "uxIDDokumentTipDataGridViewColumn":
						e.Value = DokumentZaglavljeSpecPostavkeList[e.RowIndex].IDDokumentTip;
						break;
					case "uxRedBrDataGridViewColumn":
						e.Value = DokumentZaglavljeSpecPostavkeList[e.RowIndex].RedBr;
						break;
					case "uxKolonaDataGridViewColumn":
						e.Value = DokumentZaglavljeSpecPostavkeList[e.RowIndex].Kolona;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxDokumentZaglavljeSpecPostavkeDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnDokumentZaglavljeSpecPostavkeDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxDokumentZaglavljeSpecPostavkeDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						DokumentZaglavljeSpecPostavkeList[e.RowIndex].ID = (System.Int32)e.Value;
						break;
					case "uxIDSpecTipDataGridViewColumn":
						DokumentZaglavljeSpecPostavkeList[e.RowIndex].IDSpecTip = (System.Int32)e.Value;
						break;
					case "uxIDDokumentTipDataGridViewColumn":
						DokumentZaglavljeSpecPostavkeList[e.RowIndex].IDDokumentTip = (System.Int32)e.Value;
						break;
					case "uxRedBrDataGridViewColumn":
						DokumentZaglavljeSpecPostavkeList[e.RowIndex].RedBr = (System.Int32)e.Value;
						break;
					case "uxKolonaDataGridViewColumn":
						DokumentZaglavljeSpecPostavkeList[e.RowIndex].Kolona = (System.Decimal)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
